﻿using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration.Json;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coldairarrow.Util
{
    public class JsonSettingHelper
    {
        public static IConfiguration configuration = new ConfigurationBuilder()
            .SetBasePath(Directory.GetCurrentDirectory()) // 设置配置文件所在的目录
            .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true).Build(); // 添加JSON配置文件


        public static string GetSetting(string value)
        {
            return configuration[value];
        }


    }
}
